package bdz.projects.atwww.atlas.model
{
	public class BHPItem
	{
		private var values:XMLList;
		private var icType:String;
		public var index:Number;
		public function BHPItem(xm:XML)
		{
			parseInfo(xm);
			var tcsg:String = values[5].toString();
			if(tcsg.indexOf("&") != -1){
				tcsg = tcsg.split("&").join("");
			}
			icType = tcsg.split(" ").join("") + "Icon";
		}
		private function parseInfo(xm:XML):void{
			values = xm.Values.Value;	
		}
		
		public function get id():String{
			return values[0].toString();
		}
		public function get label():String{
			return values[1].toString();
		}
		public function get name():String{
			return values[1].toString();
		}
		public function get description():String{
			return values[2].toString();
		}
		public function get siteOperator():String{
			return values[3].toString();
		}
		public function get operatingCompany():String{
			return values[4].toString();
		}
		
		public function get csg():String{
			return values[5].toString();
		}
		public function get locationAccuracy():String{
			return values[6].toString();
		}
		public function get csgReps():String{
			return values[7].toString();
		}
		public function get businessReps():String{
			return values[8].toString();
		}
		public function get companyReps():String{
			return values[9].toString();
		}
		public function get location():String{
			return values[10].toString();
		}
		public function get coordinates():Object{
			return {latitude:values[11].@Y, longtitude:values[11].@X};
		}
		public function get latitude():Number{
			return Number(values[11].@Y);
		}
		public function get longtitude():Number{
			return Number(values[11].@X);
		}
		public function get link():String{
			return values[12].toString();
		}
		public function get image():String{
			return values[13].toString();
		}
		public function get region():String{
			return values[14].toString();
		}
		public function get iconType():String{
			return icType;
		}

	}
}